home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 4 / BBS in a Box - Macintosh - Volume IV (January 1992) (BBS in a Box).iso / Files / Hyper / Ss-Sz / Summarizer.cpt / Summarizer 1.3 / card_8073.txt < prev    next >
Encoding:
Text File  |  1987-12-25  |  11.2 KB  |  445 lines

  1. -- card: 8073 from stack: in.3
  2. -- bmap block id: 4119
  3. -- flags: 0000
  4. -- background id: 6834
  5. -- name: ChptLstCrd
  6.  
  7.  
  8. -- part 2 (button)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=26 top=304 right=329 bottom=87
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Quit
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   answer "Perhaps you accidently pressed Quit?" with "Yes I did" or "No I didn't"
  23.   if it is "No I didn't" then domenu "Quit Hypercard"
  24. end mouseUp
  25.  
  26.  
  27.  
  28.  
  29. -- part 3 (field)
  30. -- low flags: 01
  31. -- high flags: 2007
  32. -- rect: left=254 top=0 right=342 bottom=512
  33. -- title width / last selected line: 0
  34. -- icon id / first selected line: 0 / 0
  35. -- text alignment: 0
  36. -- font id: 3
  37. -- text size: 9
  38. -- style flags: 0
  39. -- line height: 12
  40. -- part name: ChptLstFld
  41. ----- HyperTalk script -----
  42. on mouseup
  43.   global Chapt
  44.   Put the number of lines in card field "ChptLstFld" into NumChapt
  45.   if NumChapt is 0 then exit mouseup
  46.   set locktext of card field "ChptLstFld" to false
  47.   get the clickloc
  48.   delete item 1 of it
  49.   click at 493,it
  50.   click at 260,it with shiftkey
  51.   set locktext of card field "ChptLstFld" to true
  52.   repeat with x = 1 to NumChapt
  53.     if the selection is line x of card field "ChptLstFld" then exit repeat
  54.   end repeat
  55.   put line x of card field "ChptOrdrFld" into ChaptNum
  56.   put Bs10To26(ChaptNum) into Chapt
  57.   visual effect zoom open slowly
  58.   go to card Chapt
  59. end mouseup
  60.  
  61.  
  62.  
  63. -- part 8 (field)
  64. -- low flags: 81
  65. -- high flags: 2004
  66. -- rect: left=156 top=120 right=205 bottom=356
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 0 / 0
  69. -- text alignment: 1
  70. -- font id: 3
  71. -- text size: 12
  72. -- style flags: 19200
  73. -- line height: 16
  74. -- part name: No Match
  75. ----- HyperTalk script -----
  76. on mouseup
  77.   hide card field "No Match"
  78. end mouseup
  79.  
  80.  
  81. -- part 28 (field)
  82. -- low flags: 81
  83. -- high flags: 0007
  84. -- rect: left=81 top=99 right=214 bottom=144
  85. -- title width / last selected line: 0
  86. -- icon id / first selected line: 0 / 0
  87. -- text alignment: 0
  88. -- font id: 3
  89. -- text size: 9
  90. -- style flags: 0
  91. -- line height: 12
  92. -- part name: ChptOrdrFld
  93.  
  94.  
  95. -- part 33 (button)
  96. -- low flags: 00
  97. -- high flags: 0000
  98. -- rect: left=96 top=266 right=291 bottom=157
  99. -- title width / last selected line: 0
  100. -- icon id / first selected line: 0 / 0
  101. -- text alignment: 1
  102. -- font id: 0
  103. -- text size: 12
  104. -- style flags: 0
  105. -- line height: 16
  106. -- part name: Contents
  107. ----- HyperTalk script -----
  108. on mouseup
  109.   global Chapt
  110.   repeat while true
  111.     go to card "ChptLstCrd"
  112.     put number of lines in card field "ChptLstFld" + 1 into ChaptNum
  113.     put "Name Chapter" && ChaptNum into Prompt
  114.     ask prompt
  115.     if it is empty then exit mouseup
  116.     put it into UsrChptNam
  117.     put 1 into x
  118.     repeat while true
  119.       put "Name Topic" && x && "of Chapter" && ChaptNum into prompt
  120.       ask prompt
  121.       if it is empty then
  122.         go to card "ChptLstCrd"
  123.         if x > 1 then exit repeat
  124.         if x is 1 then exit mouseup
  125.       end if
  126.       put it into UsrTpcNam
  127.       if x is 1 then
  128.         put UsrChptNam & return after card field "ChptLstFld"
  129.         put ChaptNum & return after card field "ChptOrdrFld"
  130.         put Bs10To26(ChaptNum) into Chapt
  131.         set cursor to 4
  132.         set lockscreen to true
  133.         put PasteAtPrev("TpcLstTmplt") into dummy
  134.         set lockscreen to false
  135.         set the name of this card to Chapt
  136.         set lockscreen to false
  137.       end if
  138.       put UsrTpcNam & return after field "TpcLstFld"
  139.       set lockscreen to true
  140.       set cursor to 4
  141.       put the number of lines in field "TpcLstFld" into TopicNum
  142.       put TopicNum & return after field "TpcOrdrFld"
  143.       put PasteAtPrev("NtTmplt") into dummy
  144.       put Chapt & TopicNum into NtCrdNam
  145.       set the name of this card to NtCrdNam
  146.       put UsrTpcNam into field "HeaderFld"
  147.       go to card Chapt
  148.       flash 2
  149.       add 1 to x
  150.       set lockscreen to false
  151.     end repeat
  152.   end repeat
  153. end mouseup
  154.  
  155.  
  156. -- part 34 (button)
  157. -- low flags: 00
  158. -- high flags: 0000
  159. -- rect: left=166 top=266 right=291 bottom=227
  160. -- title width / last selected line: 0
  161. -- icon id / first selected line: 0 / 0
  162. -- text alignment: 1
  163. -- font id: 0
  164. -- text size: 12
  165. -- style flags: 0
  166. -- line height: 16
  167. -- part name: Delete
  168. ----- HyperTalk script -----
  169. on mouseUp
  170.   put number of lines in card field "ChptLstFld" into LstChptNum
  171.   if LstChptNum is 0 then exit mouseup
  172.   ask "Delete which chapter?"
  173.   if it is empty then exit mouseup
  174.   put it into DelChoice
  175.   repeat with LnClicked = 1 to LstChptNum
  176.     if DelChoice is line LnClicked of card field "ChptLstFld" then exit repeat
  177.     if LnClicked is LstChptNum then
  178.       show card field "No Match"
  179.       exit mouseup
  180.     end if
  181.   end repeat
  182.   set cursor to 4
  183.   set lockscreen to true
  184.   put line LnClicked of card field "ChptOrdrFld" into ChptOrdrNum
  185.   put Bs10To26(ChptOrdrNum) into ChptName
  186.   if ChptOrdrNum is LstChptNum then
  187.     delete line LnClicked of card field "ChptOrdrFld"
  188.     delete line LnClicked of card field "ChptLstFld"
  189.     put DelCards(ChptName) into dummy
  190.   else
  191.     repeat with x = 1 to LstChptNum
  192.       if line x of card field "ChptOrdrFld" is LstChptNum then exit repeat
  193.     end repeat
  194.     put ChptOrdrNum into line x of card field "ChptOrdrFld"
  195.     delete line LnClicked of card field "ChptLstFld"
  196.     delete line LnClicked of card field "ChptOrdrFld"
  197.     put DelCards(ChptName) into dummy
  198.     put Bs10To26(LstChptNum) into LstChapName
  199.     go to card LstChapName
  200.     set name of this card to ChptName
  201.     put number of lines in field "TpcLstFld" into LstTpcNum
  202.     go to card LstChapName & 1
  203.     repeat with x = 1 to LstTpcNum
  204.       if short name of this card is "@" then
  205.         --
  206.       else
  207.         set name of this card to ChptName & x
  208.       end if
  209.       go to next card
  210.     end repeat
  211.   end if
  212.   go to card "ChptLstCrd"
  213.   set lockscreen to false
  214.   flash 2
  215. end mouseUp
  216.  
  217.  
  218.  
  219. -- part 35 (button)
  220. -- low flags: 00
  221. -- high flags: 0000
  222. -- rect: left=96 top=304 right=329 bottom=157
  223. -- title width / last selected line: 0
  224. -- icon id / first selected line: 0 / 0
  225. -- text alignment: 1
  226. -- font id: 0
  227. -- text size: 12
  228. -- style flags: 0
  229. -- line height: 16
  230. -- part name: Rename
  231. ----- HyperTalk script -----
  232. on mouseUp
  233.   Put number of lines in card field "ChptLstFld" into NumChapt
  234.   if NumChapt is 0 then exit mouseup
  235.   ask "Rename what Chapter?"
  236.   if it is empty then exit mouseup
  237.   put it into ChToRenam
  238.   repeat with LnNum = 1 to NumChapt
  239.     if ChToRenam is line LnNum of card field "ChptLstFld"
  240.     then exit repeat
  241.     if LnNum is NumChapt then
  242.       show card field "No Match"
  243.       exit mouseup
  244.     end if
  245.   end repeat
  246.   put "Enter New Title for Chapter" into prompt
  247.   ask prompt
  248.   if it is empty then
  249.     exit mouseup
  250.   else
  251.     put it into NewTitle
  252.     put NewTitle into line LnNum of card field "ChptLstFld"
  253.   end if
  254.   flash 2
  255. end mouseUp
  256.  
  257.  
  258.  
  259. -- part 36 (button)
  260. -- low flags: 00
  261. -- high flags: 0000
  262. -- rect: left=166 top=304 right=329 bottom=227
  263. -- title width / last selected line: 0
  264. -- icon id / first selected line: 0 / 0
  265. -- text alignment: 1
  266. -- font id: 0
  267. -- text size: 12
  268. -- style flags: 0
  269. -- line height: 16
  270. -- part name: Insert
  271. ----- HyperTalk script -----
  272. on mouseUp
  273.   global Chapt
  274.   put number of lines in card field "ChptLstFld" into TtlNumChpts
  275.   if TtlNumChpts is 0 then exit mouseup
  276.   put "Name for inserted Chapter?" into prompt
  277.   ask prompt
  278.   if it is empty then exit mouseup
  279.   put it into InsertedName
  280.   put "Insert after what chapter? [none]" into prompt
  281.   ask prompt
  282.   if it is empty then exit mouseup
  283.   put it into AfterName
  284.  
  285.   if AfterName is "none" then
  286.     put 1 into ChptInsrtNum
  287.   else
  288.     repeat with x = 1 to TtlNumChpts
  289.       if line x of card field "ChptLstFld" is AfterName then exit repeat
  290.       if x is TtlNumChpts then
  291.         show card field "No Match"
  292.         exit mouseup
  293.       end if
  294.     end repeat
  295.     put x + 1 into ChptInsrtNum
  296.   end if
  297.  
  298.   put 1 into x
  299.   repeat while true
  300.     put "Name Topic" && x && "of Chapter" && ChptInsrtNum into prompt
  301.     ask prompt
  302.     if it is empty then
  303.       go to card "ChptLstCrd"
  304.       exit mouseup
  305.     end if
  306.     put it into UsrTpcNam
  307.  
  308.     if x is 1 then
  309.       put InsertedName & return before line ChptInsrtNum of card field "ChptLstFld"
  310.       put TtlNumChpts + 1 into LstChptNum
  311.       put LstChptNum & return before line ChptInsrtNum of card field "ChptOrdrFld"
  312.       put Bs10To26(LstChptNum) into Chapt
  313.       set cursor to 4
  314.       set lockscreen to true
  315.       put PasteAtPrev("TpcLstTmplt") into dummy
  316.       set lockscreen to false
  317.       set the name of this card to Chapt
  318.     end if
  319.  
  320.     put UsrTpcNam & return after field "TpcLstFld"
  321.     put the number of words in field "TpcLstFld" into TopicNum
  322.     put TopicNum & return after field "TpcOrdrFld"
  323.     set cursor to 4
  324.     set lockscreen to true
  325.     put PasteAtPrev("NtTmplt") into dummy
  326.     put Chapt & TopicNum into NtCrdNam
  327.     set the name of this card to NtCrdNam
  328.     put UsrTpcNam into field "HeaderFld"
  329.     go to card Chapt
  330.     set lockscreen to false
  331.     add 1 to x
  332.     flash 2
  333.   end repeat
  334. end mouseUp
  335.  
  336.  
  337.  
  338. -- part 37 (button)
  339. -- low flags: 00
  340. -- high flags: 0000
  341. -- rect: left=26 top=266 right=291 bottom=87
  342. -- title width / last selected line: 0
  343. -- icon id / first selected line: 0 / 0
  344. -- text alignment: 1
  345. -- font id: 0
  346. -- text size: 12
  347. -- style flags: 0
  348. -- line height: 16
  349. -- part name: Remove All
  350. ----- HyperTalk script -----
  351. on mouseUp
  352.   answer "Delete table of contents & all graphics/text?" with "OK" or "Cancel"
  353.   if it is empty then exit mouseup
  354.   if it is "OK" then
  355.     set cursor to 4
  356.     set lockscreen to true
  357.     go to first card
  358.     put false into essential
  359.     repeat for number of cards
  360.       get short name of this card
  361.       if it is "ChptLstCrd" or it is "TpcLstTmplt" or it is "NtTmplt" or it is "Welcome" then
  362.         put true into essential
  363.         go to next card
  364.       end if
  365.       if not essential then domenu "delete card"
  366.       put false into essential
  367.     end repeat
  368.     if the freeSize of this stack is not 0 then
  369.       if the diskSpace > the size of this stack
  370.       then domenu "Compact Stack"
  371.     end if
  372.     go to card "ChptLstCrd"
  373.     put empty into card field "ChptLstFld"
  374.     put empty into card field "ChptOrdrFld"
  375.     set lockscreen to false
  376.     hide msg
  377.     flash 2
  378.   end if
  379. end mouseUp
  380.  
  381.  
  382.  
  383. -- part 44 (button)
  384. -- low flags: 00
  385. -- high flags: 0000
  386. -- rect: left=217 top=227 right=251 bottom=246
  387. -- title width / last selected line: 0
  388. -- icon id / first selected line: 19678 / 19678
  389. -- text alignment: 1
  390. -- font id: 0
  391. -- text size: 12
  392. -- style flags: 0
  393. -- line height: 16
  394. -- part name: New Button
  395. ----- HyperTalk script -----
  396. on mouseUp
  397.   show card field "endsignal"
  398. end mouseUp
  399.  
  400.  
  401.  
  402. -- part 45 (field)
  403. -- low flags: 81
  404. -- high flags: 2004
  405. -- rect: left=58 top=59 right=160 bottom=456
  406. -- title width / last selected line: 0
  407. -- icon id / first selected line: 0 / 0
  408. -- text alignment: 1
  409. -- font id: 0
  410. -- text size: 12
  411. -- style flags: 0
  412. -- line height: 16
  413. -- part name: endsignal
  414. ----- HyperTalk script -----
  415. on mouseup
  416.   hide card field "endsignal"
  417. end mouseup
  418.  
  419.  
  420. -- part contents for card part 8
  421. ----- text -----
  422.  
  423.  
  424. No Match Found!
  425.  
  426. -- part contents for card part 45
  427. ----- text -----
  428.  
  429.  
  430. Some routines take considerable time to execute.
  431. When you see the flashing screen it is safe to continue!
  432.  
  433. -- part contents for card part 3
  434. ----- text -----
  435. Purpose of this stack...
  436. Changes since Summarizer 1.2
  437. Shareware Notice
  438.  
  439.  
  440. -- part contents for card part 28
  441. ----- text -----
  442. 1
  443. 2
  444. 3
  445.